﻿<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>文件上传表单</title>   
    <script type="text/javascript">
        function test_route() {
            //var xmlhttp;
            //if (window.XMLHttpRequest) {
            //    // code for IE7+, Firefox, Chrome, Opera, Safari
            //    xmlhttp = new XMLHttpRequest();
            //}
            //else {// code for IE6, IE5
            //    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            //}
            //xmlhttp.open("GET", "/index/test_route");
            //xmlhttp.send();
            document.location.href="/index/test_route";
        }
    </script> 
</head>
<body>
    <div data-name="get post">
        <form action="/process_get" method="GET">
            First Name: <input type="text" name="first_name">  <br>
            Last Name: <input type="text" name="last_name">
            <input type="submit" value="GET">
        </form>
        <form action="/process_get" method="post">
            First Name: <input type="text" name="first_name">  <br>
            Last Name: <input type="text" name="last_name">
            <input type="submit" value="post">
        </form>
    </div>
    <div data-name="文件上传">
        <h3>文件上传：</h3>
        选择一个文件上传: <br />
        <form action="/file_upload" method="post" enctype="multipart/form-data">
            <input type="file" name="image" size="50" />
            <br />
            <input type="text" value="上传文件" />
        </form>
    </div>
    <div data-name="路由选择">
        <input type="button" value="测试路由选择" onclick="test_route()" />
    </div>
</body>
</html>